<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>DataGear 看板示例</title>
<style type="text/css">
.dg-chart{
  display: inline-block;
  width: 400px;
  height: 400px;
}
</style>
<script type="text/javascript">
var time = new Date();
var day = ("0" + time.getDate()).slice(-2);
var month = ("0" + (time.getMonth() + 1)).slice(-2);
var today = time.getFullYear() + "-" + (month) + "-" + (day);

time.setDate(time.getDate() -1)
day = ("0" + time.getDate()).slice(-2);
month = ("0" + (time.getMonth() + 1)).slice(-2);
var yesterday = time.getFullYear() + "-" + (month) + "-" + (day);
//看板表单配置
var dashboardFormConfig =
{
    items:
    [
        {
          name:"startTime", value: yesterday, inputType:"date", link: [{chart: 0, param: 0}, {chart: 1, param: 0}]
        },
        {name:"endTime", value:today, inputType:"date", link: {chart:0,param:1}},
        {name:"uid", type:"STRING", link: {chart:0,param:2}},
        {name:"cmd", type:"STRING", link: {chart:0,param:3}}
    ],
    link:  ["chart1"],
    submitText: "查询"
};
</script>
</head>
<body class="dg-dashboard">
<div style="position: absolute;left:1;top:1;font-size:12px;">
	DataGear <br> http://www.datagear.tech
</div>
<div style="font-size:2em;text-align:center;margin-bottom:5px;">DataGear 看板示例
<form dg-dashboard-form="dashboardFormConfig" class="dg-inline"></form></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="chart1" class="dg-chart" dg-chart-widget="b6016e8f117c348fb7ee"></div>
</body>
</html>